The present invention relates to the transfer of compressed files from a server computer to a client computer and, in particular, to a method and system for compressing stored data files by a server computer, in a memory-efficient manner, according to parameters that reflect the client computer""s capabilities and the preferences of a user of the client computer.
During the past five years, the volume of information exchanged between computer systems via the Internet has dramatically increased. Along with an increase in the volume of information, there has been a rapid increase in the variety of information exchanged via the Internet. Ten years ago, the Internet was used predominately for transfer of simple text files and larger binary data files. Today, users of personal computers (xe2x80x9cPCsxe2x80x9d) routinely request and receive from server computers, via the Internet, complex graphical displays, high-resolution still images, recorded music and other audio files, animation and video files, and even live broadcast of relatively high-resolution video images.
While the greatly increased volume and rate of data exchange over the Internet has fueled many technological and commercial advances, a number of server-related problems have been exacerbated, particularly with respect to the transfer of data files, such as images and audio files, that are large in size and that may be rendered for presentation on a number of different types of user rendering and presentation devices. The rate at which data can be transferred from a server computer to a client computer via the Internet, and particularly to home PCs, may be quite limited. Files containing data for still images and video images, for example, may be quite large, on the order of hundreds of kilobytes to tens or hundreds of megabytes. A user interactively requesting and displaying images on a home PC from a server via the Internet may often encounter very long data transfer delays due to the large sizes of requested image, audio, and video files. A primary technique for improving data transfer rates is to compress the data prior to transferring it from a server computer to a client computer. Once the data has arrived at the client computer, the data can be decompressed to restore the image to a displayable format. Thus data compression provides a means for decreasing the amount of data that needs to be transferred in order to transfer an image from the server to the client computer more quickly.
Many different types of data compression and decompression algorithms are available. Under lossless data compression and decompression algorithms, the stored image is identical, in information content, to the original image resident on the server computer. Under lossy data compression and decompression, the restored image may contain less information, and may also contain certain visual artifacts that arise during the compression and decompression processes. Generally, greater compression ratios can be achieved by lossy compression and decompression algorithms. In many cases, the information lost during lossy compression and decompression may be unnecessary, because the client computer is incapable of using the lost information for improving the rendering and presentation of the data. For example, a high-resolution image file that can be displayed on a high-end specialized graphics terminal may contain far greater information or, in other words, greater image detail, than can be displayed by a relatively low-resolution PC display screen. In addition, various mathematical manipulations that can be incorporated into the compression and decompression algorithms provide a means for altering data so that the data can be rendered more faithfully by different types of rendering and presentation components. For example, the visual appearance of a color image rendered for display on a CRT screen may differ dramatically from the visual appearance of the same color image printed on a color printer. Compression and decompression algorithms can incorporate different types of enhancement algorithms in order to tailor a restored image for rendering and presentation on a particular device. Using the same example, if the server computer can determine that a user is requesting an image file in order to print the file on a printer, the server computer can compress the image in a way that will allow the image to be restored on the user""s computer in a form that produces the visual appearance of the image as displayed on the CRT screen. Unfortunately, the rendering and presentation characteristics of various rendering and presentation components, including CRT and active matrix display screens and various printing devices, may differ dramatically from one type of device to another.
Server computer architects, Internet providers, and digital image processing scientists have recognized the desirability of serving differently compressed data files, including image files, to different users in order to provide the greatest possible data compression, and concomitant best possible data transfer rate, without unacceptable loss of information and to provide compressed data files that can be rendered and presented as faithfully as possible on different types of user rendering and presentation devices. A common technique is to prepare, in advance, a number of different compressed versions of each data file and to provide to a given user that version of a data file that most closely matches the capabilities of the user""s computer and Internet connection and that most closely matches the user""s preference. However, storage space on server computers is limited. Even compressed data files take up a large amount of data storage space. Practically, only a limited number of compressed versions of each particular data file served by a server computer can be economically and conveniently stored. Thus, only a very crude, low-granularity matching of compressed images to user computer capabilities and user preferences can be achieved in this way. On-demand compression of uncompressed and unprocessed data files is computationally expensive, incurs excessively long transfer delays, and required excessive amounts of server computer memory. Server architects and Internet developers have thus recognized a need for a method and system for tailoring data file compression more closely to user computer capabilities and user preferences, and for doing so in a more efficient manner with respect to server data storage and server memory resources.
One embodiment of the present invention provides a method and system for on-demand data compression of data files for transfer from a server computer to a client computer. A single compressed, or partially compressed, version of the data file is stored on the server computer. A user may register various user preferences and user computer capabilities with the server computer prior to requesting the data file, or may indicate some or all of the preferences and capabilities at the time of the request for the data file. The server computer then compresses the requested data file according to the capabilities of the user""s computer and user preferences, using default values for parameters not specified by the user. The preferences and capabilities-based compression is achieved in a particularly computationally and memory efficient manner. The compressed data file is then sent from the server computer to the user computer, where it is decompressed and rendered for presentation by the user""s computer.
In different embodiments of the present invention, different types of data files are compressed and decompressed using different compression and decompression algorithms. In one embodiment of the present invention, image data formatted according to the Joint Photographic Expert""s Group (xe2x80x9cJPEGxe2x80x9d) are compressed and decompressed according to JPEG compression and decompression algorithms, modified with various image enhancement techniques for efficient transfer of JPEG images from a server computer to a user""s computer and for faithful rendering and presentation of the JPEG images by the user""s computer. The method of the present invention may be applied to images formatted according to other standards, or to audio or video data files. Moreover, the technique of the present invention may be applied to the rendering and presentation of data files on various rendering and presentation devices directly connected to the computer system on which the data files are stored.